using System.Web.Services;
using System.ComponentModel;
using System.Collections.Generic;
using Bosphorus.Integration.Jira.Thor.Core.View.Domain;
using Bosphorus.Integration.Jira.Thor.Dal.Vao.Model;
using Bosphorus.Library.Dao.Facade;

namespace Bosphorus.Integration.Jira.Thor.WebService
{
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [ToolboxItem(false)]
    public class JiraIntegrationService : System.Web.Services.WebService
    {
        [WebMethod]
        public List<IssueView> GetIssuesByProject(string projectKey)
        {
            IList<IssueView> issueViews = Repository.View.Live<IssueView>.As<IssueVao>().GetByProject(projectKey);
            return (List<IssueView>)issueViews;
        }
    }
}
